<?php
/**
 * DESC:
 * 作者:晨光
 * EMAIL:461718846@qq.com
 * DATE:2020-06-03
 */

namespace app\common\model;


use think\Model;

class User extends Model
{
    public static function getUserInfo($user_id){
        $data = self::where('id','=',$user_id)->find();
//        订单数量
        $data['order_num'] = Order::where('user_id',$user_id)->count();
//        分享订单数量
        $data['share_order_num'] = Order::getUserShareBuy($user_id);
//        当前正在申请提现的金额
        $data['cash_apply'] = UserCash::getApplyMoeny($user_id);
        return $data;
    }
}
